<!-- Breadcrums -->
<?php $this->load->view('helpers/breadcrums.php'); ?>
<!-- Breadcrum -->
<div class="container">
<div id="main">
<div class="row">
	<div class="span9">
		<div class="w-box">
			<div class="w-box-content cnt_a">
				<h1 class="page-header"><?php echo $events['Title']; ?></h1>
	
				<?php if($events['eventsMedia']) { ?>
				<div class="carousel property">
					<div class="preview"><?php
						$preview = "";
						foreach ($events['eventsMedia'] as $key => $img) {
							if ($key == 0) {
								$preview = $this->config->item('HTTP_EVENT_MEDIA_IMAGE') . str_replace(' ', '%20', $img->FileName . '-870x420' . $img->Extension);
								break;
							}
						}
						?> <img src="<?php echo $preview; ?>" alt="">
					</div><!-- /.preview -->
				
					<div class="content">
						<?php if($events['eventsMedia']) { ?> 
						<a class="carousel-prev" href="#">Previous</a> 
						<a class="carousel-next" href="#">Next</a>
						<ul>
							<?php foreach ($events['eventsMedia'] as $key => $img) { ?>
							<li <?php if ($key == 0) { echo 'class="active"'; } ?>><img src="<?php echo $this->config->item('HTTP_EVENT_MEDIA_IMAGE') . str_replace(' ', '%20', $img->FileName . '-870x420' . $img->Extension); ?>" alt="<?php echo $events['Title']; ?>" /></li>
							<?php } ?>
						</ul>
					<?php } ?>
					</div><!-- /.content -->
				</div>
				<?php } ?> <!-- /.carousel -->
			
			<div class="property-detail">
			<div class="pull-left overview">
			<div class="row">
			<div class="span4">
			<h2>Overview</h2>
			<table>
				<tr>
					<th>Event:</th>
					<td><?php echo $events['Title']; ?></td>
				</tr>
				<?php if(strtotime($events['StartDate']) == strtotime($events['EndDate'])) { ?>
				<tr>
					<th>Start Date:</th>
					<td><?php echo date('d-M-Y',strtotime($events['StartDate']));?></td>
				</tr>
				<tr>
					<th>End Date:</th>
					<td><?php echo date('d-M-Y',strtotime($events['EndDate']));?></td>
				</tr>
				<tr>
					<th>Time:</th>
					<td><?php echo $events['StartTime'];?> to <?php echo $events['EndTime'];?></td>
				</tr>
				<?php } else { ?>
				<tr>
					<th>Start Date:</th>
					<td><?php echo date('d-M-Y',strtotime($events['StartDate']));?></td>
				</tr>
				<tr>
					<th>Time:</th>
					<td><?php echo $events['StartTime'];?></td>
				</tr>
				<tr>
					<th>End Date:</th>
					<td><?php echo date('d-M-Y',strtotime($events['EndDate']));?></td>
				</tr>
				<tr>
					<th>Time:</th>
					<td><?php echo $events['EndTime'];?></td>
				</tr>
				<?php } ?>
				<tr>
					<th>Venue:</th>
					<td><?php echo $events['Venue']; ?></td>
				</tr>
				<?php if(!empty($events['Email'])) { ?>
				<tr>
					<th>Contact:</th>
					<td><a href="mailto:<?php echo $events['Email']; ?>"><?php echo $events['Email']; ?></a></td>
				</tr>
				<?php } ?>
			</table>
			</div>
			<!-- /.span2 --></div>
			<!-- /.row --></div>
			<div class="description">
			<p><?php echo html_entity_decode($events['Description'] , ENT_QUOTES, 'UTF-8'); ?></p>
			</div>
			<div class="clearfix"></div>
			</div>
		</div>
	</div>
	</div>
	<div class="sidebar span3"><?php $this->load->view('helpers/widgets/ad.php'); ?>
	</div>
	</div>
	</div>
</div>
